
#include <cassert>
#include <iostream>
#include <memory>
#include <vector>
using namespace std;

class test {

  unique_ptr<int> p;

public:
  test() { p = make_unique<int>(); }

  /**
   * @brief  虽然不能显示删除,但一调用复制就会报错
   *
   */
  //   test(const test &) = delete;
};

class Test {
private:
  /* data */
public:
  Test(/* args */);
  ~Test() { cout << "delete data" << std::endl; }
};

int main() {
  unique_ptr<int> p;
  //   cout << *p << endl;
  cout << p.get() << endl;

  p = make_unique<int>();

  *p = 10;
  cout << *p << endl;

  vector<test> t(10);

  t.resize(100);

  vector<test> t2;
  //   t2 = t;

  return 0;
}